/*
 * Created on 2007-2-23
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package com.sqm.timecard;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.apache.commons.lang.builder.ToStringBuilder;


public class VacationRecord
{    
    public static final int MORNING_VACATION=1;
    public static final int WHOLE_DAY_VACATION=2;
    public static final int NOON_VACATION=3;
    public static final int MIDDLE_VACATION=4;
    
    private String employeeId;
    private Calendar startTime;
    private Calendar endTime;
    private int vacationType;
    private String comments;

    public VacationRecord(String employeeId, Calendar startTime, Calendar endTime, int vacationType, String comments)
    {
        super();
        // TODO Auto-generated constructor stub
        this.employeeId = employeeId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.vacationType = vacationType;
        this.comments = comments;
    }

    public VacationRecord()
    {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * @param args
     */
    public static void main(String[] args)
    {
        // TODO Auto-generated method stub
    }

    /**
     * @return Returns the comments.
     */
    public String getComments()
    {
        return comments;
    }

    /**
     * @param comments The comments to set.
     */
    public void setComments(String comments)
    {
        this.comments = comments;
    }

    /**
     * @return Returns the employeeId.
     */
    public String getEmployeeId()
    {
        return employeeId;
    }

    /**
     * @param employeeId The employeeId to set.
     */
    public void setEmployeeId(String employeeId)
    {
        this.employeeId = employeeId;
    }

    /**
     * @return Returns the vacationType.
     */
    public int getVacationType()
    {
        return vacationType;
    }

    /**
     * @param vacationType The vacationType to set.
     */
    public void setVacationType(int vacationType)
    {
        this.vacationType = vacationType;
    }

    /**
     * @return Returns the endTime.
     */
    public Calendar getEndTime()
    {
        return endTime;
    }

    /**
     * @param endTime The endTime to set.
     */
    public void setEndTime(Calendar endTime)
    {
        this.endTime = endTime;
    }

    /**
     * @return Returns the startTime.
     */
    public Calendar getStartTime()
    {
        return startTime;
    }

    /**
     * @param startTime The startTime to set.
     */
    public void setStartTime(Calendar startTime)
    {
        this.startTime = startTime;
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return new ToStringBuilder(this).append("startTime", sdf.format(this.startTime.getTime()))
            .append("endTime", sdf.format(this.endTime.getTime()))
                .append("vacationType", this.vacationType).append("comments",
                        this.comments).append("employeeId", this.employeeId)
                .toString();
    }
    

}
